//
//  UIView+XLExtension.m
//  XLTabBarController
//
//  Created by ZxlAndZyp on 2019/1/8.
//  Copyright © 2019 zuoxueliang. All rights reserved.
//

#import "UIView+XLExtension.h"

@implementation UIView (XLExtension)

- (void)setZxl_x:(CGFloat)zxl_x
{
    CGRect frame = self.frame;
    frame.origin.x = zxl_x;
    self.frame = frame;
}

- (CGFloat)zxl_x
{
    return self.frame.origin.x;
}

- (void)setZxl_y:(CGFloat)zxl_y
{
    CGRect frame = self.frame;
    frame.origin.y = zxl_y;
    self.frame = frame;
}

- (CGFloat)zxl_y
{
    return self.frame.origin.y;
}

- (void)setZxl_width:(CGFloat)zxl_width
{
    CGRect frame = self.frame;
    frame.size.width = zxl_width;
    self.frame = frame;
}

- (CGFloat)zxl_width
{
    return self.frame.size.width;
}

- (void)setZxl_height:(CGFloat)zxl_height
{
    CGRect frame = self.frame;
    frame.size.height = zxl_height;
    self.frame = frame;
}

- (CGFloat)zxl_height
{
    return self.frame.size.height;
}

- (void)setZxl_size:(CGSize)zxl_size
{
    CGRect frame = self.frame;
    frame.size = zxl_size;
    self.frame = frame;
}

- (CGSize)zxl_size
{
    return self.frame.size;
}

- (void)setZxl_centerX:(CGFloat)zxl_centerX
{
    CGPoint center = self.center;
    center.x = zxl_centerX;
    self.center = center;
}

- (CGFloat)zxl_centerX
{
    return self.center.x;
}

- (void)setZxl_centerY:(CGFloat)zxl_centerY
{
    CGPoint center = self.center;
    center.y = zxl_centerY;
    self.center = center;
}

- (CGFloat)zxl_centerY
{
    return self.center.y;
}

@end
